Glossary

buffer object

An OpenGL object that represents a linear array of memory, containing arbitrary data. The contents of the buffer are defined by the user, but the memory is allocated by OpenGL. Data in buffer objects can be used for many purposes, including storing vertex data to be used when rendering.

input variable

A shader variable, declared at global scope. Input variables receive their values from earlier stages in the OpenGL rendering pipeline.

output variable

A shader variable, declared at global scope, using the out keyword. Output variables written to by a shader are passed to later stages in the OpenGL rendering pipeline for processing.

vertex attribute

Input variables to vertex shaders are called vertex attributes. Each vertex attribute is a vector of up to 4 elements in length. Vertex attributes are drawn from buffer objects; the connection between buffer object data and vertex inputs is made with the glVertexAttribPointer and glEnableVertexAttribArray functions. Each vertex attribute in a particular program object has an index; this index can be queried with glGetAttribLocation. The index is used by the various other vertex attribute functions to refer to that specific attribute.

attribute index

Each input variable in a vertex shader must be assigned an index number. This number is used in code to refer to that particular attribute. This number is the attribute index.

viewport transform

The process of transforming vertex data from normalized device coordinate space to window space. It specifies the viewable region of a window.

shader object

An object in the OpenGL API that is used to compile shaders and represent the compiled shader's information. Each shader object is typed based on the shader stage that it contains data for.

program object

An object in the OpenGL API that represents the full sequence of all shader processing to be used when rendering. Program objects can be queried for attribute locations and various other information about the program. They also contain some state that will be seen in later tutorials.